package com.handsome.策略模式;

/**
 *
 * 策略模式解决鸭子问题
 * @author niechun
 * @date 2023/3/27 20:08
 */
public class Client {

    public static void main(String[] args) {
        Duck wildDuck=new WildDuck();
        wildDuck.display();
        wildDuck.fly();
        Duck pekingDuck = new PekingDuck();
        pekingDuck.display();
        pekingDuck.fly();
        Duck toyDuck = new ToyDuck();
        toyDuck.display();
        toyDuck.fly();
    }
}
